<template>
	<view class="cus-only-nav" :style="{lineHeight: menuHeight+'px',height: menuHeight+'px', paddingTop: statusbarHeight + 'px'}">
		{{title}}
		<slot v-if="!title"></slot>
	</view>
</template>

<script>
	export default {
		name:"custom-only-nav",
		props: {
			title: String,
			bgColor: String,
			navHeight: Number,
			Ticolor:String
		},
		data() {
			return {
				statusbarHeight:  uni.getSystemInfoSync().statusBarHeight+4,
				menuHeight: this.navHeight || 44
			};
		},
		created() {
			console.log(111)
			console.log(this.navHeight)
			// this.statusbarHeight = uni.getSystemInfoSync().statusBarHeight 
			// console.log(uni.getSystemInfoSync(),uni.getMenuButtonBoundingClientRect())
		}
	}
</script>

<style>
.cus-only-nav{
	text-align: center;
	position: fixed;
	top: 0;
	z-index: 999;
	width: 100%;
	background: #fff;
}
</style>